<%@ page contentType="text/html; charset=gb2312"%>
<%@ page import="java.util.*"%>
<%@ page import="com.flymobi.po.*"%>
<%@ page import="com.flymobi.service.*"%>
<%@ page import="com.flymobi.fw.util.*"%>
<%@ page import="com.flymobi.fw.modules.*"%>
<%
		String act;
		String qd;
		String lm;
		String pd;
		String m;
		String oid;
		String ztid;
		String v;
		String t1;
		String t2;
		TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
		String ua=request.getHeader("User-Agent");
		String url="";
		if (ua != null && ua.length() > 100) {
			ua = ua.substring(0, 100);
		}
		act=request.getParameter("act");
		qd=request.getParameter("qd");
		lm=request.getParameter("lm");
		pd=request.getParameter("pd");
		m=request.getParameter("m");
		oid=request.getParameter("oid");
		ztid=request.getParameter("ztid");
		v=request.getParameter("v");
		t1=request.getParameter("t1");
		t2=request.getParameter("t2");
		if(StringUtil.isEmpty(act)){
			act="1";
		}
		if(StringUtil.isEmpty(qd)){
			qd="0";
		}
		if(StringUtil.isEmpty(pd)){
			pd="0";
		}
		if(StringUtil.isEmpty(lm)){
			lm="0";
		}
		if(StringUtil.isEmpty(oid)){
			oid="0";
		}
		if(StringUtil.isEmpty(ztid)){
			ztid="0";
		}
		if(StringUtil.isEmpty(v)){
			v="xhtml";
		}
		switch(new Integer(act)){
			case 1:
				url="index.html";
				break;
			case 2:
				url="pd.html?id="+pd;
				break;
			case 3:
				url="lm.html?id="+lm;
				break;
			case 4:
				url="view.html?id="+oid;
				break;
			case 5:
				url="zt.html";
				break;
			case 6:
				url="gd.html?id="+pd;
				break;
			case 7:
				url="nav.html";
				break;
			case 8:
				url="search.html";
				break;
			/*case 9:
				url="ad.html";
				break;*/
			case 10:
				url="comment.html?act=more&id="+oid;
				break;
			case 11:
				url="ztview.html?id="+ztid;
				break;
		}
		ViewLog vo=new ViewLog();
		vo.setActionid(act);
		vo.setQudaoId(new Long(qd));
		vo.setIp(request.getRemoteAddr());
		vo.setLanmuId(new Long(lm));
		vo.setPindaoId(new Long(pd));
		vo.setMobile(m);
		vo.setNewsId(new Long(oid));
		vo.setUa(ua);
		vo.setZhuantiId(new Long(ztid));
		vo.setV(v);
		vo.setUrl(url);
		vo.setType1(t1);
		vo.setType2(t2);
		vo.setDay(DateUtil.dateFormate(new Date(), "MMdd"));
		vo.setHour(DateUtil.dateFormate(new Date(), "HH"));
		vo.setSavetime(new Date());
		vo.setUpdatetime(new Date());
		SM.ViewLogService.logFile(vo);
 %>
